<script>
$(document).load(function(){
submitSearch();
} );
</script>
<link rel="stylesheet" href="<?php echo $this->baseUrl("/media/css/investorProfile.css")?>" type="text/css" />
<!-- START OF WRAPPER -->
<!-- START OF FULL_WIDTH_HOME -->
<div class="full_width_home"> 
  <!-- START OF BREADCRUMB --><!-- END OF BREADCRUMB --> 
  <!--    <h2>&nbsp;</h2>--> 
  
  <h2 class="investor_name"><?php echo ucwords($this->user->username);?></h2>
  <div class="investor_profile_search_container">
    <div class="investor_profile_search_form">
      <form id="search_form" name="search_form" method="post" action="<?php echo $this->baseUrl()?>/bbling/index/search">
        <div>&nbsp;Sector</div>
        <?php echo Evebit_Html_Select::genericlist ( $this->industryTypes, 'search[industry]','style="width:350px;" class="chzn-select"' );?>
        <div>&nbsp;Location</div>
        <?php echo Evebit_Html_Select::genericlist ( $this->locations, 'search[location]','style="width:350px;" class="chzn-select"' );?>
        <div>&nbsp;Funding Required</div>
        <?php echo Evebit_Html_Select::genericlist ( $this->fundTypes, 'search[fund]','style="width:350px;" class="chzn-select"' );?>
        <div>&nbsp;Stage</div>
        <?php echo Evebit_Html_Select::genericlist ( $this->stateTypes, 'search[state]','style="width:350px;" class="chzn-select"' );?>
        <input type="text" style="width:346px;" name="search[keywords]" onfocus="this.value=''" value="Key Word..."/>
      </form>
      <!-- <input type="image" src="<?php echo $this->baseUrl('/media/')?>img/go_transparent.png" alt="" class="go" onclick="submitSearch()" /> -->
      <div class="investor_profile_search_button">
        <p class="button"><a href="javascript:submitSearch()">Search&nbsp;&nbsp;&nbsp;&nbsp;</a></p>
      </div>
    </div>
    <div class="investor_profile_big_img"> <img alt="" src="<?php echo $this->baseUrl('/media/images/investor_profile_page_img.png');?>"> </div>
  </div>
  <dir class="clear_both"></dir> 
  <script type="text/javascript">
	  function submitSearch(){
		  document.getElementById('search_form').submit();
	  }
	</script>
  <hr class="investor_profile_hr" />
  <h2 style="text-align:left;">&nbsp;&nbsp;&nbsp;&nbsp;Search Results</h2>
  <table  class="investor_profile_company_list_table" style="width:900px;">
    <thead class="investor_profile_search_table_thead">
      <tr>
        <td>Business Name</td>
        <td>Location</td>
        <td>Funding Required</td>
        <td>Stage</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </thead>
    <?php $loop_num=1;?>
    <?php foreach ($this->data as $key => $item):?>
    <?php $style = ($loop_num++%2) == 0?'style="background:#F0F7FD"':''?>
    <tr>
      <td <?php echo $style ?>><?php echo ucwords(str_replace('_', ' ', $item->username))?></td>
      <td <?php echo $style ?>><?php echo ucwords(str_replace('_', ' ', $item->your_location))?></td>
      <td <?php echo $style ?>><?php if($item->funding_required) echo '£'.$item->funding_required?></td>
      <td <?php echo $style ?>><?php echo ucwords(str_replace('_', ' ', $item->business_state))?></td>
      <td <?php echo $style ?> class="investor_profile_button_td"><p class="button"><a href="<?php echo $this->baseUrl('/bbling/index/entrepreneur-profile-investor-view/id/'.$item->id)?>" >View</a></p></td>
      <td <?php echo $style ?> class="investor_profile_button_td"><p class="button"> <a href="<?php echo $this->baseUrl('/bbling/index/add-list/id/'.$item->id)?>">Shortlist</a> </p></td>
      <td <?php echo $style ?> class="investor_profile_button_td"><p class="button"> <a href="#inline-1" rel="prettyPhoto" >Contact</a></p>
	  
        <div id="inline-1" class="hide" style="display:none">
          <p>Great, we're glad you found something interesting. The business owner would like to be contacted by email. Their email is:</p>
          <p><?php echo $item->email; ?></p>
        </div></td>
    </tr>
    <?php endforeach;?>
  </table>
  <h2 style="text-align:left;">&nbsp;&nbsp;&nbsp;&nbsp;Your Shortlist</h2>
  <table  class="investor_profile_company_list_table" style="width:900px;">
    <thead class="investor_profile_table_thead">
      <tr>
        <td>Business Name</td>
        <td>Location</td>
        <td>Funding Required</td>
        <td>Stage</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
        <td>&nbsp;</td>
      </tr>
    </thead>
    <?php $loop_num=1;?>
    <?php foreach ($this->data_shortlist as $key => $item):?>
    <?php $style = ($loop_num++%2) == 0?'style="background:#FCF0F5"':''?>
    <tr>
      <td <?php echo $style ?>><?php echo ucwords(str_replace('_', ' ', $item->username))?></td>
      <td <?php echo $style ?>><?php echo ucwords(str_replace('_', ' ', $item->your_location))?></td>
      <td <?php echo $style ?>><?php if($item->funding_required) echo '£'.$item->funding_required?></td>
      <td <?php echo $style ?>><?php echo ucwords(str_replace('_', ' ', $item->business_state))?></td>
      <td <?php echo $style ?> class="investor_profile_button_td"><p class="button"><a href="<?php echo $this->baseUrl('/bbling/index/entrepreneur-profile-investor-view/id/'.$item->business_id)?>">View</a></p></td>
      <td <?php echo $style ?> class="investor_profile_button_td"><p class="button"><a href="<?php echo $this->baseUrl().'/bbling/index/delete-list/id/'.$item->id ?>">Delete</a></p></td>
      <td <?php echo $style ?> class="investor_profile_button_td"><p class="button"> <a href="#inline-1" rel="prettyPhoto" >Contact</a></p>
        <div id="inline-1" class="hide" style="display:none">
          <p>Great, we're glad you found something interesting. The business owner would like to be contacted by email. Their email is:</p>
          <p><?php echo $item->email; ?></p>
        </div></td>
    </tr>
    <?php endforeach;?>
  </table>
  <p> 
    <!-- THIS IS HR --> 
    <!-- END OF FULL WIDTH HOME --> 
  </p>
</div>
</div>
<!-- END OF WRAPPER --> 
<script type="text/javascript"> 
$(".chzn-select").chosen(); 

$("a[rel^='prettyPhoto']").prettyPhoto({
	theme:'light_square',
	showTitle: true
});
</script> 
